home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / sharew / textvera.rb / 7up / calclock / spool.c < prev    next >
C/C++ Source or Header  |  1992-08-27  |  717b  |  32 lines

  1. #include <aes.h>
  2. #include <string.h>
  3.  
  4. int msgbuf[8];
  5. char filename[64];
  6.  
  7. int main(int argc, char *argv[])
  8. {
  9.    int i,gl_apid,acc_id,msgbuf[8];
  10.  
  11.    gl_apid=appl_init();
  12.    if((acc_id=appl_find("CALCLOCK"))>=0 && argc>1)
  13.    {
  14.       for(i=1; i<argc; i++)
  15.       {
  16.          strcpy(filename,argv[i]);
  17.          shel_find(filename);
  18.          strupr(filename);
  19.          msgbuf[0]=0x4711;
  20.          msgbuf[1]=gl_apid;
  21.          msgbuf[3]=(unsigned int)((long)filename >> 16);
  22.          msgbuf[4]=(unsigned int)((long)filename & 0xffff);
  23.          msgbuf[6]=1;
  24.          msgbuf[7]=0;
  25.          appl_write(acc_id,16,msgbuf);
  26.          evnt_mesag(msgbuf);
  27.       }
  28.    }
  29.    appl_exit();
  30.    return(argc-1);
  31. }
  32.